package ninja.awesome.game.gameobject;

import ninja.awesome.framework.Graphics;
import ninja.awesome.framework.Image;
import ninja.awesome.game.MainGameScreen;
import ninja.awesome.game.MainGameScreen.PlayingMode;
import ninja.awesome.game.classes.Neutral;
import ninja.awesome.game.compat.Rectangle;
import ninja.awesome.game.main.Controller;
import ninja.awesome.game.main.Physics;
import ninja.awesome.game.main.Sprites;


public class Package extends GameObj implements Neutral {

	private Image image;
	private int speed = 1;
	MainGameScreen game;
	Sprites s;
	Controller c;
	private int type;
	private long Timer;
	private long Delay;
	private int package_is_open;
	private boolean isDead = false;


	public Package(String ref, int xLoc, int yLoc, int speed, int type,
			MainGameScreen game, Controller c, Sprites s) {
		super(xLoc, yLoc);
		this.type = type;
		this.Timer = System.nanoTime();
		this.Delay = 10000L;
		this.game = game;
		this.c = c;
		this.s = s;
		image = s.getLife();


	}



	@Override
	public void update() {
		yLoc += speed;
		if (game.getPlayingMode() == PlayingMode.SINGLE) {
			if (Physics.collision(this, game.getNinja())) {
				game.getNinja().setHEALTH(game.getNinja().getHEALTH() + 0);
				c.removeNeutral(this);
			}
		}


	}


	@Override
	public void draw(Graphics g) {
		// TODO Auto-generated method stub

	}


	@Override
	public Rectangle getBounds() {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public int getX() {

		return xLoc;
	}


	@Override
	public int getY() {
		return yLoc;
	}

	public void setpackage_is_open (int package_is_open ){
		this.package_is_open = package_is_open ;
	}

	public int getpackage_is_open (){
		return package_is_open;

	}
}


